<%--用户查看个人笔记的界面--%>
<%@ page import="dao.ImplementManager" %>
<%@ page import="pojo.Note" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    .title_left{
        margin-left: 420px;
    }
    .content_left{
        border:1px solid black;
        width: 440px;
        margin-left: 420px;
        height: 100px;
        margin-bottom: 20px;
    }
    .back{
        margin-left: 790px;
    }
    .pass{
        margin-left: 790px;
    }
</style>
<script>
    function passNote(id){
        //给用户是否删除的安全提示，弹出提示框
        if(confirm("您确定通过吗？")){
            location.href="${pageContext.request.contextPath}/areaPassnoteServlet?id="+id;
        }
    }
</script>
<body>
<h3 align="center">待审核笔记</h3>
<a href="${pageContext.request.contextPath}/web/areanote.jsp" type="submit" class="back">返回</a>
<%
   String type= (String) session.getAttribute("type");
    ImplementManager implementManager=new ImplementManager();
    ArrayList<Note> allareanotes=new ArrayList<>();
    allareanotes=implementManager.areaNote(type);
    request.setAttribute("allareanotes",allareanotes);
%>
<c:forEach items="${allareanotes}" var="note" varStatus="s">
    <c:if test="${note.style==0}">
        <form>
            <table>
                <tr>
                    <td>
                        <h5 class="title_left" >${note.title}</h5>
                        <a href="javascript:passNote(${note.id});" class="pass" type="submit">通过</a>
                        <p class="content_left" >${note.content}</p>
                    </td>
                </tr>
            </table>
        </form>
    </c:if>
</c:forEach>
</body>
</html>
